package tingyu;

import tingyu.array.DynamicArray;
import tingyu.stack_queue.ArrayStack;
import tingyu.stack_queue.Solution;

public class Main {
    public static void main(String[] args) {
//        arrayTest();
//        stacksTest();
        System.out.println(Solution.isValid("({[]})"));
    }

    public static void arrayTest() {
        DynamicArray<Integer> array = new DynamicArray<>(20);
        for (int i = 0; i < 13; i++) {
            array.addLast(i);
        }
        System.out.println(array);

        array.add(2, 66);
        System.out.println(array);

        array.addFirst(88);
        System.out.println(array);

        array.remove(3);
        System.out.println(array);

        array.removeElement(10);
        System.out.println(array);

        array.removeFirst();
        System.out.println(array);

        array.removeLast();
        System.out.println(array);
    }

    public static void stacksTest() {
        ArrayStack<Integer> stacks = new ArrayStack<>();

        for (int i = 0; i < 5; i++) {
            stacks.push(i);
            System.out.println(stacks);
        }

        stacks.pop();
        System.out.println(stacks);
    }
}
